package com.swlz.servlet;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.swlz.Const;

/**<pre>
 * - 登出
 * ClassName : com.swlz.servlet.LogoutServlet
 * Author : swlz
 * E-Mail : 2233875735@qq.com
 * Date : 2020年8月1日 上午10:48:23
 * Version : 1.0
 * Copyright 2020 swlz.top Inc. All rights reserved. 
 * Warning: this content is only for internal circulation of the company. 
 * It is forbidden to divulge it or use it for other commercial purposes.
 * </pre>
 **/
@WebServlet("/logout.let")
public class LogoutServlet  extends HttpServlet{

	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		req.getSession().removeAttribute(Const.LOGIN_USER_SESSION_NAME);
		resp.sendRedirect(req.getContextPath()+"/");
	}
}
